﻿<!-- MAIN CONTENT -->
<div id="content">
    
    <div smart-include="app/yksensor/views/sub-header.tpl.html"></div>
    <div class="row margin-bottom-10">
        <div class="col-xs-12">
            <!-- <input type="text" class="input-sm" placeholder=""> -->
            <button class="btn btn-labeled btn-primary" ng-click="createProject()"><!--ng-click="addStore()"-->
                <span class="btn-label">
                    <i class="glyphicon glyphicon-plus"></i>
                </span>
                新建油罐
            </button>
        </div>
    </div>
    <div id="storeBox" class="clearfix margin-bottom-50">
        <!-- <h1>库区总览</h1> -->
        <div class="well padding-10 tank-well pull-left text-center" ng-repeat="pro in projects" ng-click="viewDetail(pro.id)" >
            <img src="styles/img/tank/拱顶.jpg" alt="" ng-src="styles/img/tank/{{pro.type == 1 ? '拱顶' : (pro.type == 2 ? '卧式' : '')}}.jpg">
            <a class="tank-name">{{pro.name}}【{{pro.num}}】</a>
            <div class="progress_box">
                <div class="progress vertical bottom" >
                    <div class="progress-bar bg-color-redLight" data-transitiongoal="{{pro.oil_level}}" aria-valuenow="{{pro.oil_level}}" style="background-color:#bb0000!important; height: {{pro.oil_level}}%; opacity:0.5">{{pro.oil_level}}%</div>
                </div>
            </div>
            <table class="table table-bordered">
                <tbody>
                    <tr>
                        <td><b>油罐类型</b></td>
                        <td>{{pro.type == 1 ? "立式钢油罐" : (pro.type == 2 ? "卧式钢油罐" : "")}}</td>
                    </tr>
                    <tr>
                        <td><b>储油类型</b></td>
                        <td>{{pro.oil_type}}</td>
                    </tr>
                    <tr>
                        <td><b>体积质量</b></td>
                        <td>{{pro.volume}} m3 / {{pro.quality}} t</td>
                    </tr>
                    <tr>
                        <td><b>当前液位</b></td>
                        <td>{{pro.oil_level/100*pro.height}} m</td>
                    </tr>
                    <tr>
                        <td><b>平均温度</b></td>
                        <td>{{pro.avg_temp}} °C</td>
                    </tr>
                </tbody>
            </table>
        </div>

    </div>

</div>
<!-- END MAIN CONTENT -->

<!-- 新增仓库 -->
<div class="modal fade" id="AddStoreModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header bg-color-white">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    ×
                </button>
                <h6 class="modal-title txt-color-black">
                    新增油罐
                </h6>
            </div>
            <div class="modal-body">
                <form class="smart-form">
                    <div class="clearfix margin-bottom-10">
                        <div class="col-sm-3 text-align-right">
                            <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">油罐名称:</strong>
                        </div>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" ng-model="newstore.name">
                        </div>
                    </div>
                    <div class="clearfix margin-bottom-10">
                        <div class="col-sm-3 text-align-right">
                            <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">油罐编号:</strong>
                        </div>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" ng-model="newstore.tankid">
                        </div>
                    </div>
                    <div class="clearfix margin-bottom-10">
                        <div class="col-sm-3 text-align-right">
                            <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">油罐类型:</strong>
                        </div>
                        <div class="col-sm-7">
                            <select class="input-sm form-control" ng-model="newstore.type">
                                <option value="1">立式钢油罐</option>
                                <option value="2">卧式钢油罐</option>
                            </select> <i></i>
                        </div>
                    </div>
                    <div class="clearfix margin-bottom-10">
                        <div class="col-sm-3 text-align-right">
                            <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">储油类型:</strong>
                        </div>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" ng-model="newstore.oiltype">
                        </div>
                    </div>
                    <div class="clearfix margin-bottom-10">
                        <div class="col-sm-3 text-align-right">
                            <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">油罐体积:</strong>
                        </div>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" ng-model="newstore.volume">
                        </div>
                    </div>
                    <div class="clearfix margin-bottom-10">
                        <div class="col-sm-3 text-align-right">
                            <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">油罐质量:</strong>
                        </div>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" ng-model="newstore.quality">
                        </div>
                    </div>
                    <div class="clearfix margin-bottom-10">
                        <div class="col-sm-3 text-align-right">
                            <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">当前液位比:</strong>
                        </div>
                        <div class="col-sm-7">
                            <input type="number" class="form-control" min="0" max="100" step="1" value="0" ng-model="newstore.level">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    取消
                </button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="newStore()">
                    保存
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>